﻿using System.Collections.Generic;
using System.Linq;

namespace Sustainalytics.Utils
{
    public static class ContainsAnyExtensions
    {
        public static bool ContainsAny<T>(this List<T> inputList, List<T> containList)
        {
            return inputList.Intersect(containList).Any();
        }

        public static bool ContainsAny<T>(this IEnumerable<T> inputList, IEnumerable<T> containList)
        {
            return inputList.Intersect(containList).Any();
        }
    }
}
